"""
-*- coding:utf-8 -*-
__project_ = 'le-bo16'
__file_name__ = 'lebo01'
__author__ = 'wang'
__time__ = '2020/10/26 21:35'
__product_name = PyCharm
# code is far away from bugs with the god animal protecting
    I love animals. They taste delicious.
              ┏┓      ┏┓
            ┏┛┻━━━┛┻┓
            ┃        ┃
            ┃  ┳┛  ┗┳  ┃
            ┃      ┻      ┃
            ┗━┓      ┏━┛
                ┃      ┗━━━┓
                ┃  神兽保佑    ┣┓
                ┃　永无BUG！   ┏┛
                ┗┓┓┏━┳┓┏┛
                  ┃┫┫  ┃┫┫
                  ┗┻┛  ┗┻┛
"""

# print ("hello world")
# num = 1
# sum = 1
# while num <= 100:
#
#     sum = num + sum
#     num += 1
# print (sum)
# num = 0
# sum = 0
# while num <  100:
#     num += 1
#     if num % 2 == 0:
#        sum +=  num
#        # print (num)
# print(sum)
#行
# i = 1
# while i <= 5:
#     j = 1
#     while j <= i:
#        print ("*",end="")
#        j += 1
#     print ("\n")
#     i += 1
# 九九乘法口诀
# i = 1
# while i <= 9:
#     j = 1
#     while j<=i:
#         print("%d * %d = %-10d  " %(i,j,(i*j)),end="" )
#         j += 1
#     print()
#     i += 1
# lebo ="123456"
# for name in lebo:
#     print (name)
# 左闭右开
# for name in range (1,2):
#     print (name)
# break 的作用：立刻结束break所在循环
# i = 0
# while i<5:
#     if i==2:
#         break
#     i += 1
#     print (i)
#range 是左闭右开
# for i in range(1,10):
#     print(i)
# contiue 作用 ：用来结束本次循环 紧接着执行下一次循环 break/contiue只对最近的循环起作用 不能单独使用 只能用在循环中
#python循环的高级操作-嵌套循环continue=break while 循环 for 循环
# i = 1
# while i<5:
#     i += 1
#     print (i)
#     if i ==2:
#         continue
# for i in range(5):
#     if i == 2:
#         continue
#     print (i)
# for i in range(5):
#     if i ==2:
#         continue
#     print(i)
# else:
#     print("else")
# 字符串介绍，有序的字符序列，说明有下标，通过下标索引
# a = str()
# a = input()
# 字符串的长度
my_str ="1gkjsnsdkcjhwjhgjsh"
# # print(len(my_str))
# print(my_str[4])
# 左闭右开 切片
# print(my_str[3:8])
# print(my_str[3:8:2])
# find index  查找 如果找到就返回索引值 如果没找到就返回-1或者报错
# a = my_str.find("s")
# print(a)
# a = my_str.rfind("s") 从右向左找
#  a=my_str.count("s") 计数
# a = my_str.index("s") 查找
# 一键替换
# a = my_str.replace("s","666")
# print(a)
# a = my_str.replace("s","666",2)
# print(a)
# 替换两次
# a = my_str.split("s")
# print(a)
# 吧s当做逗号进行分割
# 指定替换几个 不能指定替换第几个  这个方法达不到  需要切片加替换 字符串可以相加 拼接字符串
# count index find split replace index  rfind  just strip join
# capitalize 吧首字母大写
# my_str = "abcd"
# ret = my_str.capitalize()
# print(ret)
# title 每个单词的首字母大写
# my_str ="hello word"
# ret = my_str.title()
# print(ret)
# 是不是以ac开头
my_str = "abbd"
# ret = my_str.startswith("ac")
# print(ret)

# 是不是以bd结尾
# ret =my_str.endswith("bd")
# 吧小写变大写
# ret = my_str.upper()
# print(ret)
# 吧大写变小写
# ret = my_str.lower()
# my_str ="abcd"
# 填充空格
# 填充右边
# ret = my_str.ljust(10,"6")
# print(ret)
# 填充左边
# ret = my_str.rjust(10,"6")
# print(ret)
# ret = my_str.center(10,"6")
# print(ret)
# 填充中间，填充奇数的话  一边多 一边少
# my_str = "   as   da   "
# ret = my_str.strip()
# print(ret)
# strip 去除两端的空格
# print(ret)
# lstrip  rstrip  左边去空格  末尾去空格
# join
# my_str = ["123","45678"]
# ret = "aaa".join(my_str)
# print(ret)
# 吧列表转换成字符串
# help(str.count)
# 列表 可以承载任意的数据类型  列表可以做下标索引
a = [True,3.14,100,"acv"]
# print((a[1:3]))
# 空的列表
# my_list =list()
# my_list =[]

# my_list =len(a)
# print(my_list)
# 计算列表里的长度
# 列表的for  while  循环
# range
# for i in a:
#     print(i)
# i = 0
# while i <len(a):
#     print(a[i])
#     i +=1
# 字符串是不可变的数据类型 列表是可变的数据类型
# ---------------字符串的定义--------------
# 练一练





